{template common/header}
{template user/userheader}
<div class="container mt20">
	<div class="span12 main">
		{template user/usernav}
		<div class="messages">
			<h4 class="mt10 text_c">
			{lang tip_security_settings}
			</h4>
         <form id="update_password_form" action="{url user/resetpasswd}" class="form-horizontal mt10" method="post">
         	<fieldset>
					{if $cuser['is_social']} 
					<div class="control-group">
			            <label class="control-label" for="email">{lang user_email}</label>
			            <div class="controls">
			                <input id="email" type="text" name="email" remote="{url user/emailcheck}" not-valid="{lang 500_email_not_valid:tip}" remote-error="{lang 500_email_existed:tip}"/>
			            </div>
			        </div>
			        {else}
					<div class="control-group">
			            <label class="control-label" for="email">{lang user_email}</label>
			            <div class="controls">
			                <input id="email" class="disabled" type="text" placeholder="$cuser['email']" disabled/>
			            </div>
			        </div>
			        <div class="control-group">
			            <label class="control-label" for="org_passwd">{lang user_orgin_password}</label>
			            <div class="controls">
			                <input id="org_passwd" type="password" name="org_passwd"/>
			            </div>
			        </div>
			        {/if}
			       
			        <div class="control-group">
			            <label class="control-label" for="new_passwd">{lang user_new_password}</label>
			            <div class="controls">
			                <input id="new_passwd" type="password" name="new_passwd" not-valid="{lang 500_password_not_valid:tip}" not-match="{lang 500_password_not_match:tip}"/>
			            </div>
			        </div>
			        
			        <div class="control-group">
			            <label class="control-label" for="new_verify_passwd">{lang re_user_new_password}</label>
			            <div class="controls">
			                <input id="new_verify_passwd" type="password" name="new_verify_passwd"/>
			            </div>
			        </div>
			        
			        <div class="control-group">
			        	<label class="control-label"></label>
			            <div class="controls">
			            <button type="submit" class="btn btn-primary submit-btn" data-loading-text="{lang tip_loading}">{lang save}</button>
			            </div>
			        </div>
         	</fieldset>
    	</form>
       </div>
	</div>
</div>
<script>
$(document).ready(function() {
	$.oValidate('update_password_form');
});
</script>
{template common/footer}